home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / almanac.doc < prev    next >
Text File  |  1995-03-31  |  8KB  |  145 lines

  1. (Comp.sys.handhelds) 
  2. Item: 1360 by metcalf at akala.ifa.hawaii.edu 
  3. Author: [Tom Metcalf] 
  4.   Subj: HP48 Celestial Navigation 
  5.   Date: Thu Dec 06 1990 09:41  
  6.  
  7. I posted the following sight reduction program the other day with  
  8. a slight bug.  Here is the corrected version.  Sorry to waste bandwidth! 
  9.  
  10. --------------------------------------------------------- 
  11.  
  12. Following is an HP-48SX program I wrote to do celestial navigation. 
  13. It computes a position fix from observations of any number of celestial 
  14. bodies using a least squares fit to the altitude of the bodies as a function 
  15. of time.  The routine does all the standard corrections for dip, refraction, 
  16. parallax etc. as well as correcting for motion of the observer between sights. 
  17.  
  18. It does not compute the GHA/declination of celestial bodies, so a copy of 
  19. the nautical almanac is required to use these routines.  It will, however, 
  20. interpolate the GHA and declination from the hourly entries on the daily pages 
  21. of the nautical almanac. 
  22.  
  23. A detailed description of the mathematical basis of the algorithm is  
  24. available upon request. 
  25.  
  26. ---------------------------------------------------------- 
  27.  
  28.  Instructions 
  29.  
  30.  
  31. There are several steps to go through to get a fix from a set of observations. 
  32. When prompted for input, key in the requested data, and press "ENTER". 
  33. All angular inputs must be in degrees and in the "hms" format: dddd.mmss,  
  34. where dddd is degrees, mm is minutes and ss is seconds of arc.  All times  
  35. must also be input in the "hms" format. 
  36. For example, 16.3427 is 16 degrees 34 minutes 27 seconds if an angle is  
  37. being input and 14.0153 is 14:01:53 if a time is being input. 
  38.  
  39. The output is the optimum latitude and longitude, both in "hms" format. 
  40. North latitude and west longitude are positive numbers, while south latitude 
  41. and east longitude are negative numbers.  For example, 
  42. 157 deg 49 min 58 sec W, 21 deg 17 min 30 sec N would be output as 
  43.  
  44.  LON:  157.4958 
  45.  LAT:   21.1730 
  46.  
  47. 1. If you want to start a new set of observations purge the variable 
  48.    "obs".  This variable stores all the observations, so, to start over, this 
  49.    variable must be removed.  You may want to rename it rather than remove it 
  50.    if it will be useful at a later time. 
  51.  
  52. 2. Run the program "setup".  This sets up the appropriate corrections 
  53.    and the GHA-declination interpolation 
  54.    for the observed body.  This program must be run whenever a new body 
  55.    is observed or whenever the observations have extended beyond the  
  56.    times given for the GHA/declination interpolation (TIM1,TIM2) 
  57.    since the interpolation will become inaccurate. 
  58.    If you are observing more than one body, input all the  
  59.    observations for each before proceeding to the next (temporal order  
  60.    does not matter).  The "setup" program asks for the following input: 
  61.    a) BODY: S is for the Sun, M is for the Moon, VM 
  62.       is for Venus or Mars, and anything else assumes a star or other planet. 
  63.       Note that alpha mode is automatically initiated. 
  64.    b) INDEX:  The index correction (degrees, in hms format) which is to be  
  65.       *added* to the observed sextant altitude,  e.g. 1' should be 
  66.       input as 0.0100. 
  67.    c) SEMI-D: Semi-diameter in degrees, "hms" format: e.g. 16.2 min 
  68.       should be input as 0.1612 since 0.2 min = 12" (Sun only). 
  69.    d) HP: Parallax in degrees, "hms" format (Moon,Venus,Mars only). 
  70.    e) LIMB: For Upper limb enter "1", for lower limb enter "-1", and 
  71.       for disk center enter "0" (Sun/Moon only). 
  72.    f) HEIGHT: Height above water (in meters) at which the observations 
  73.       were taken (for the dip correction). 
  74.    g) GHA1 DEC1 TIM1: The Greenwich Hour Angle and declination at time TIM1. 
  75.       The actual values for the observations will be interpolated linearly 
  76.       from this value and the next.  TIM1 should be a whole hour near the  
  77.       observation times.  All three numbers should be input on the appropriate 
  78.       line *before* pressing "ENTER".  To move to the next item, use the  
  79.       down-arrow key.  All three entries must be in "hms" format. 
  80.    h) GHA2 DEC2 TIM2: The second set of values for the linear interpolation. 
  81.       TIM2 should be a whole hour after TIM1 and in "hms" format 
  82.       (generally, TIM1 and TIM2 should be consecutive hours).  All observations 
  83.       must be between TIM1 and TIM2.  If this is not the case, the observations 
  84.       should be input in several groups, running "setup " between groups. 
  85.       If the GHA passes through zero between GHA1 and GHA2, 360 degrees should 
  86.       be added to GHA2. 
  87.    i) SPEED: Speed of vessel during the observations (knots). If the 
  88.       speed is zero, the program will terminate at this point. 
  89.    j) COURSE: True course of vessel during the observations (hms format). 
  90.    k) DR LAT LON:  Dead reckoning latitude and longitude to use in the 
  91.       correction of the observations for course and speed (hms format). 
  92.       Negative values indicate East longitude or South latitude. 
  93.    l) TIME OF FIX: The time to which the course and speed corrections  
  94.       are made (hms format).  This will be the time at which the fix is valid. 
  95.  
  96. 3.  Enter the observations: 
  97.     a) Enter the time of the observation (hms format) and then the  
  98.        uncorrected altitude (hms format) onto the stack.   
  99.     b) Run the "correct" program to correct the observations for index,  
  100.        dip, refraction (for standard conditions), parallax, and course/speed. 
  101.     c) Run the "addob" program to add the observation to the "obs" variable. 
  102.     d) Repeat until all observations are input. 
  103.     e) Accurate dead reckoning information can be included by editing 
  104.        the "obs" variable and inputing an additional row into  the matrix with 
  105.        the first element equal to the DR longitude (West positive), the second 
  106.  
  107.        element equal to the DR latitude (North positive), and the final element 
  108.        equal to 90.00.  The MatrixWriter application is particularly useful  
  109.        for editing the "obs" variable. 
  110.  
  111. 4.  Get the fix by running the "solve" program.  This program can be run at  
  112.     any time when there are at least 3 observations (including dead reckoning) 
  113.     in "obs".  It does not affect "obs", so more observations can be input  
  114.     after running "solve".  If "convergence error" appears or if the position  
  115.     estimate is far from your dead reckoning position, there is probably an  
  116.     error in the input data and it should be reentered (if the data is correct 
  117.     and "convergence error" appears,  the position fix should not be trusted). 
  118.     Remember: the fix is, at best, only as good as the data you supply, and 
  119.     you should examine the results critically! 
  120.  
  121. 5.  If all observations are for a *single celestial body*, run the "error"  
  122.     program to get an estimate of the position error (miles).  This program  
  123.     assumes an error on the observations of one arc minute, and should be  
  124.     multiplied by the actual sextant error in arc minutes if it is other than  
  125.     one. 
  126.  
  127. Important note:  If observations of more than one body are input, "setup" 
  128. must be run before starting the input for each body. 
  129.  
  130.  
  131. Disclaimer: 
  132.  
  133.  
  134. This software is provided "as is" and is subject to change without 
  135. notice.  No warranty of any kind is made with regard to this software, 
  136. including, but not limited to, the implied warranties of merchantability  
  137. and fitness for a particular purpose.  The author shall not be liable for  
  138. any errors or for incidental or consequential damages in connection with  
  139. the furnishing, performance, or use of this software. 
  140.  
  141. Copyright 1990 by Thomas R. Metcalf.  Permission is granted to any 
  142. individual or institution to use, copy, or redistribute this software 
  143. so long as it is not sold for profit and provided that this copyright 
  144. notice and the above disclaimer are retained. 
  145.